package com.example.demo.service;

import com.example.demo.entity.User;
import org.springframework.data.domain.Page;

import java.util.List;
import java.util.Optional;

public interface UserService {

    Optional<User> add(User req) throws Exception;

    Optional<User> update(User req) throws Exception;

    Optional<Boolean> deleteByUserId(String optUserId, String userId) throws Exception;

    Optional<User> queryByUserId(String userId) throws Exception;

    Optional<List<User>> list(User req) throws Exception;

    Optional<Page<User>> page(User req) throws Exception;

    boolean isExist(String loginName, Integer status) throws Exception;
}
